// API域名
let hostUrl = 'https://h5v2.aiwxt.com';
let miniProgram = {
  envVersion: 'develop',
};
if (uni.getAccountInfoSync) {
  miniProgram = uni.getAccountInfoSync().miniProgram;
}
// 如何是开发版
if (miniProgram.envVersion === 'develop') {
  hostUrl = 'http://apiwxt.test';
} else if (miniProgram.envVersion === 'trial') {
  hostUrl = 'https://erpdev.aiwxt.com';
}
// token key值
const USER_ACCESS_TOKEN = 'USER_ACCESS_TOKEN';

// 服务入口
const SERVICE_LIST = [
  {
    title: '法律知识',
    icon: '/static/images/index/a3.png',
    url: '/pages/regulation/index',
  },
  {
    title: '优选律师',
    icon: '/static/images/index/a4.png',
    url: '/pages/lawyer/index',
  },
  {
    title: '债务催收',
    icon: '/static/images/index/a1.png',
    url: '/pages/service/debt/add',
  },
  {
    title: '合同审查',
    icon: '/static/images/index/a5.png',
    url: '/pages/contract/review/add',
  },
  {
    title: '合同代写',
    icon: '/static/images/index/a7.png',
    url: '/pages/contract/write/add',
  },
  {
    title: '法务咨询',
    icon: '/static/images/index/a1.png',
    url: '/pages/service/consult/add',
  },
  {
    title: '法律建议',
    icon: '/static/images/index/a2.png',
    url: '/pages/service/suggest/add',
  },
  {
    title: '律师费计算',
    icon: '/static/images/index/a3.png',
    url: '/pages/common/calc',
  },
];

// 工单处理状态样式
const WORK_ORDER_STATUS_CLS = {
  pending_assignment: 'bg-orange-200 text-orange-500',
  pending: 'bg-blue-200 text-blue-500',
  processing: 'bg-green-200 text-green-500',
  completed: 'bg-gray-200 text-gray-500',
};

export { hostUrl, USER_ACCESS_TOKEN, SERVICE_LIST, WORK_ORDER_STATUS_CLS };
